package com.rinlink.jbcodec.creator;


import com.alibaba.fastjson.JSONObject;
import com.rinlink.jbcodec.common.MapUtils;
import com.rinlink.jbcodec.transform.Transform;

public abstract class NumberToBytesCreator<T extends Number> extends ObjectToBytesCreator<T> {
    @Override
    protected Transform<byte[]> create(T t, JSONObject attr, JSONObject source) {
        String order = MapUtils.getOrDefault(attr,"order","big_engine");
        return create(t,order);
    }

    protected abstract Transform<byte[]> create(T t,String order);

}
